const db = require('../../db/index')
const uuid = require('uuid');

async function selectCardByPack (packLike, pageNum, pageSize) {
  try {
    let result = await db.query(`
    select t3.id ,t3.cn_name ,t1.code, t1.url  
    from card_code as t1 inner join release_card_code as t2 on (t1.id=t2.code_id)
    inner join card as t3 on (t3.id=t2.card_id) 
    where t1.code like 'DAMA%' 
    group by cn_name 
    order by t1.code;
    `)
    // console.log(result);
    // `select detail_like from package_detail where detail_name=${pack}`
  } catch (error) {
    throw error
  }

}
selectCardByPack('DAMA')